import requests

from api.emp_insert_api import emp_insert
from common.Authorization_date import ihrmAuthorization


class emp_select:
    data = ihrmAuthorization

    @classmethod
    def ihrm_emp_select(cls,mobile):
        dataID = emp_insert.ihrm_emp_insert('张大大33', mobile, '12343554').json()['data']['id']
        herderJson = {'Content-Type':'application/json',"Authorization":cls.data}
        URL = 'http://ihrm2-test.itheima.net/api/sys/user/' + dataID
        resp = requests.get(url=URL,headers=herderJson)

        return resp

if __name__ == '__main__':
    resp = emp_select.ihrm_emp_select('13165437890')
    print(resp.json())